/* general */

:lang(zh) {
	font-family: "Source Han Serif K", "Noto Serif CJK KR", "Source Han Serif SC", "Noto Serif CJK SC", "Source Han Serif", "Noto Serif CJK JP", "Source Han Serif TC", "Noto Serif CJK TC", "Noto Serif KR", "Noto Serif SC", "Noto Serif TC", serif, HanaMin, serif;
	font-language-override: "KOR";
}

body {
	margin: 0 auto;
	max-width: 52em;
	padding: 0 1em;
}

a {
	color: inherit;
	text-decoration: none;
}

body.link-disabled table a {
	pointer-events: none;
}

body.user-unselectable {
	user-select: none;
}

/* tooltip */

.tippy-box {
	writing-mode: vertical-rl;
}

/* table general */

.table-wrapper {
	margin: 1em 0;
	overflow-x: auto;
}

table {
	writing-mode: vertical-rl;
}

/* table border */

table {
	border-collapse: collapse;
}

th, td {
	min-height: 1em;
	min-width: 1em;
	padding: 4px;
}

thead tr,
tbody tr,
tbody tr td:nth-of-type(1) {
	border-top: 1px solid;
}

thead tr,
tbody tr:nth-child(1) {
	border-right: 1px solid;
}

thead tr,
tbody tr td:nth-of-type(4),
tbody tr td:nth-of-type(8),
tbody tr td:nth-of-type(12),
tbody tr td:nth-of-type(16),
tbody tr:last-child th:nth-of-type(1),
tbody tr:last-child th:nth-of-type(5),
tbody tr:last-child th:nth-of-type(9),
tbody tr:last-child th:nth-of-type(13),
tbody tr:last-child th:nth-of-type(17) {
	border-bottom: 1px solid;
}

tbody tr:nth-child(4),
tbody tr:nth-child(8),
tbody tr:nth-child(12),
tbody tr:nth-child(17),
tbody tr:nth-child(21),
tbody tr:nth-child(23),
tbody tr th[rowspan],
tbody tr:last-child th {
	border-left: 1px solid;
}

/* table header */

thead th:first-child {
	font-size: 1.5em;
	letter-spacing: 0.25em;
	text-align: left;
}

thead th:nth-child(2) {
	letter-spacing: 0.25em;
	text-align: right;
}

tbody th {
	text-align: right;
}

tbody tr th[rowspan] {
	max-height: 1.25em;
	font-size: larger;
}

tbody tr th:last-of-type {
	white-space: nowrap;
}

tbody tr:nth-child(22) th[rowspan] {
	line-height: 0.85;
}

/* table body */

tbody td:empty:not(.empty-position)::before {
	color: #aaa;
	content: "〇";
}

tbody tr:last-child th {
	font-size: larger;
	text-align: center;
}
